#include<bits/stdc++.h>
#define int long long
#define endl "\n"

using namespace std;

signed main() {
	int n;
	cin >> n;
	int ret = 0;
	int day = 1;
	for(int i = 1; i <= n; i ++ ) {
		if(day >= 1 && day <= 5) {
			ret ++;
		}
		day ++ ;
		if(day > 7) {
			day = 1;
		}
	}
	cout << ret * 3 << endl; 
	return 0;
}

